package cn.jiahua.test16;


import java.util.function.Function;

/**
 * 函数式接口
 */
public class Test {


    public static void main(String[] args) {
        Function<String,String> function =new Function<String, String>() {
            @Override
            public String apply(String s) {
                return s;
            }
        };

        Function<String,String> function2 =(str)->{
            return  str ;
        };

        System.out.println(function.apply("hello"));
        System.out.println(function2.apply("world"));

    }



}
